s = '伟大的中国梦'
scode = s.encode(errors='replace')
print(scode)
print(scode.decode('utf-8'))
scode = s.encode('gbk', errors='replace')
print(scode)
print(scode.decode('gbk'))